<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			td{
				border: 1px solid black;
			}
			.chair_no{
				border: none;
				background-image: url(../pics/no.png);
				height: 70px ;
				width: 80px;
				text-align: center;
			}
			.chair_yes{
				border: none;
				background-image: url(../pics/yes.png);
				height: 70px ;
				width: 80px;
				text-align: center;
			}
		</style>
	</head>
	<body>
		年份：
		<select>
			<script>
				for(var i = 1900;i <= 2024; i++){
					document.write("<option>"+i+"</option>");
				}
			</script>
		</select>
		<h1>BMI计算</h1>
		请输入你的BMI：
		<input type="text" id="input1"><br/>
		<button onclick="getBmi()">结果</button>
		<script>
			function getBmi(){
				var bmi = input1.value;
				if(bmi > 35){
					document.write("非常肥胖");
				}else if(bmi >= 30){
					document.write("肥胖");
				}else if(bmi >= 25){
					document.write("过重");
				}else if(bmi >= 20){
					document.write("适中");
				}else{
					document.write("过轻");
				}
			}
		</script>
		<h1>输出10x10表格</h1>
		<table>
			<script>
				var num = 1;
				for(var i = 1; i <= 10; i++){
					document.write("<tr>")
					for(var j = 1;j <= 10; j++){
						document.write("<td>" + num + "</td>")
						num++;
					}
					document.write("</tr>")
				}
			</script>
		</table>
		
		<h1 style="text-align: center;">万达影城</h1>
		<table style="margin: auto;">
			<script>
				for(var i = 1; i <= 6; i++){
					document.write("<tr>")
					for(var j = 1;j <= 10; j++){
						if(i == 3 && j == 3 || i == 6 && j == 1){
							document.write("<td class='chair_yes'>已售</td>")
							num++;
						}else{
							document.write("<td class='chair_no'>" + i + "排" + j + "座</td>")
							num++;
						}
					}
					document.write("</tr>")
				}
			</script>
		</table>
	</body>
</html>
